package com.ht.medicaltreatment.adapter

import com.blankj.utilcode.util.NumberUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import java.io.File

class LogTimeAdapter(logFile: MutableList<File>) : BaseQuickAdapter<File,BaseViewHolder>(R.layout.item_log_time_list_layout,logFile) {
    override fun convert(holder: BaseViewHolder, item: File) {
        var time = "--"
        if(item.name != null && item.name.contains("com.xgst")){
            val arr = item.name.split("_")
            if(arr.size >= 4){
                time = "log日志: ${arr[1]}年${arr[2]}月${arr[3]}日"
            }
        }
        holder.setText(R.id.tvName,time)
    }

}
